﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Epsilon.Expr
{
    public class RxExpr : Expression
    {
        public List<RxClauseExpr> Clauses { get; private set; }

        public RxExpr(List<RxClauseExpr> clauses, int l, int c)
            : base(l, c)
        {
            Clauses = clauses;
        }
    }

    public class RxClauseExpr : Expression
    {
        public IPattern Pattern { get; private set; }
        public Type Type { get; private set; }
        public List<Expression> Body { get; private set; }
        public string Guard { get; set; }

        public RxClauseExpr(IPattern pattern, Type type, List<Expression> body, int l, int c)
            : base(l, c)
        {
            Pattern = pattern;
            Type = type;
            Body = body;
            Guard = "";
        }
    }
}
